package Demo11;

public class Demotest {

    public static void main(String[] args) {


        Animal animal = new Animal() {
            @Override
            public void eat() {
                System.out.println("eat11");
            }
        };



        Animal animal1 = new Animal() {
            @Override
            public void eat() {
                System.out.println("eat2222");
            }
        };

        animal1.eat();
        animal.eat();

    }

}
